package boogui.member;

import java.util.Scanner;

import javax.swing.table.DefaultTableModel;

public class MembersuperviseService implements IMembersuperviseService {
	Scanner Scan = new Scanner(System.in);
	IMembersuperviseDAO msdao = null;
	IMemberDAO mado = null;

	public MembersuperviseService() {
		msdao = new MembersuperviseDAO();
		mado = new MemberDAO();
	}

	@Override
	public void idsearchMember(MemberVO m) {
		/*for (MemberVO m : msdao.idsearchMember(mv)) {
		
		}*/
	}

	@Override
	public void namesearchMember(MemberVO m) {
		/*for (MemberVO mv : msdao.namesearchMember(m)) {

			m.getMemno();
			m.getMemid();
			m.getMemname();
			m.getMembirth();
			m.getMemgenre();
			m.getMemhp();
			m.getMememail();
		}*/

	}

	@Override
	public void hpsearchMember(MemberVO m) {
		/*for (MemberVO mv : msdao.hpsearchMember(m)) {
			m.getMemno();
			m.getMemid();
			m.getMemname();
			m.getMembirth();
			m.getMemgenre();
			m.getMemhp();
			m.getMememail();
		}
*/
	}

	@Override
	public DefaultTableModel viewMember(MemberVO m) {
		DefaultTableModel model1 = new DefaultTableModel();
		for (MemberVO v : mado.selectMember()) {
			model1.addRow(new String[] { v.getMemno() , v.getMemid(),
					v.getMemname(), v.getMembirth(), v.getMemgenre(),
					v.getMemhp(), v.getMememail() });
			System.out.println(v.getMememail());

		}

		return model1;
	}

}
